const mongoose = require('mongoose');
const { baseModel } = require('./baseModel')
const StuSchema = new mongoose.Schema({
    stuNum:{
        type:String,
        required:true,
        unique:true
    },
    stuName:{
        type:String,
        required:true
    },
   //作业提交次数
   submitNum:{
    type:Number,
    default:0
   },
   //是否在读
   isReading:{
    type:Number,
    default:1 // 1 在读 2 离校
   },
   //密码
   password:{
    type:String,
    default:'123456',
   },
   jobId:{
    type:mongoose.Schema.Types.ObjectId,
    ref:'Job',
    default:'6677e46f71aebd67df73ead9'
   },
   className:{
    required:true,
    type:String
   },
   ...baseModel
})

module.exports = StuSchema